package WeekTest01;

public class Rectangle {

	private double width = 1;
	private double height = 1;
	
	public Rectangle() {
		
	}
	public Rectangle(double width,double height) {
		this.width = width;
		this.height = height;
	}
	
	public double getArea(double width,double height){	
		return width*height;
	}
	public double getPerimeter(double width,double height) {
		return 2*(width+height);
	}
	
	public double getWidth() {
		return width;
	}
	public void setWidth(double width) {
		this.width = width;
	}
	public double getHeight() {
		return height;
	}
	public void setHeight(double height) {
		this.height = height;
	}
	
	public void toString(double width,double height) {
		System.out.println("宽："+width);
		System.out.println("长："+height);
		System.out.println("面积："+getArea(width,height));
		System.out.println("周长："+getPerimeter(width,height));
	}
}
